From: Florian Müllner Date: Mon, 9 Mar 2020 15:49:34 +0000 (+0100) Subject: extensionDownloader: Remove pending updates with extension X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~751^2^2~127 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d3939a38a383b38448b8f5ef55a509b0eaddbfba;p=gnome-shell.git extensionDownloader: Remove pending updates with extension When an extension is uninstalled, there is no point in keeping a pending update: If the update didn't fail (which it currently does), we would end up sneakily reinstalling the extension. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2343 --- diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index be7426be0..b399394b1 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -56,6 +56,15 @@ function uninstallExtension(uuid) { return false; FileUtils.recursivelyDeleteDir(extension.dir, true); + + try { + const updatesDir = Gio.File.new_for_path(GLib.build_filenamev( + [global.userdatadir, 'extension-updates', extension.uuid])); + FileUtils.recursivelyDeleteDir(updatesDir, true); + } catch (e) { + // not an error + } + return true; }